package com.xxxy.yh;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/monitor")
public class SentinelController {
    @SentinelResource(value = "helloResource",blockHandler = "helloBlockHandler",
            blockHandlerClass = MonitorBlockHandler.class)
            @GetMapping("hello")
            public String hello() {
        return "hi";
    }
}
